<?php
    define('IN_ADAGPS', TRUE);         
    // Include file config va file chua cac function can thiet
    include_once('cfg.php');
    include_once(CORE_PATH.'includes/functions_index.php'); 
            
    // Set lang of app
    SetLang();
     print_r(); die();        
    // Get menu ID
    $sMenuId = isset($_GET['mid']) ? $_GET['mid'] : 'm001';
    $sMenuId = ($_GET['mid'] == '') ? 'm001' : $_GET['mid'];
    
    // Get module name
    $sModule = isset($_GET['m']) ? $_GET['m'] : 'login_form';
    $sModule = ($_GET['m'] == '') ? 'login_form' : $_GET['m'];
    $tplUrl = "index.php?mid=$sMenuId&m=$sModule"; 
                        
    // If template file is not exist, redirect to default        
    $tmplContent = TEMPL_PATH.$arrConfig['lang'].'/main_'.$sModule.'.html';
    
    $sIncFile = MODULE_PATH.'main_'.$sModule.'.php';
        
    $sIndexFile = TEMPL_PATH.$arrConfig['lang'].'/home.html';
    $objTemplate->LoadTemplate($sIndexFile, 'UTF-8');
    
    // Include modules file, all process in this module file. 
    if(file_exists($sIncFile))
    {
        include_once($sIncFile);
    }      
    $objTemplate->Show();    
?>
